package com.biz.primus.ms.commodity.trans.keyword;

import com.biz.primus.commodity.vo.keyword.KeywordVo;
import com.biz.primus.ms.commodity.dao.ro.KeywordRo;
import com.google.common.base.Function;
import javax.annotation.Nullable;

import java.text.SimpleDateFormat;

/**
 * Created by aaa on 2017/6/5.
 */
public class KeywordRo2KeywordVo implements Function<KeywordRo, KeywordVo> {

    @Nullable
    @Override
    public KeywordVo apply(@Nullable KeywordRo input) {
        final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        KeywordVo resp = new KeywordVo();
        resp.setId(String.valueOf(input.getId()));
        resp.setIdx(input.getIdx());
        resp.setSearchName(input.getSearchName());
        resp.setDisplayName(input.getDisplayName());
        resp.setIdentityFlag(input.getIdentityFlag());
        resp.setNote(input.getNote());
        return resp;
    }
}
